<!--# layout("/common/layout.html",{"jsBase":"/js/planItem/major/"}){ -->

<form class="layui-form layui-form-pane" id="addForm"  lay-filter="editform">
    <input type="hidden" name="planId" id="planId">

    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
            <label class="layui-form-label">批次id</label>
				<div class="layui-input-inline">
                                <input type="text" name="batchId" id="batchId" autocomplete="off" maxlength="50" class="layui-input" >
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">文理科综合</label>
				<div class="layui-input-inline">
                                <input type="text" name="majorTypeId" id="majorTypeId" autocomplete="off" maxlength="50" class="layui-input" >
				</div>
            </div>
        </div>
    </div>

    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
            <label class="layui-form-label">省份</label>
				<div class="layui-input-inline">
                                <input type="text" name="provinceId" id="provinceId" autocomplete="off" maxlength="50" class="layui-input" >
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">选科要求</label>
				<div class="layui-input-inline">
                                <input type="text" name="condictionId" id="condictionId" autocomplete="off" maxlength="50" class="layui-input" >
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">选科要求值</label>
				<div class="layui-input-inline">
                                <input type="text" name="courseValue" id="courseValue" autocomplete="off" maxlength="50" class="layui-input" >
				</div>
            </div>
        </div>
    </div>

    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
            <label class="layui-form-label">大学或专业</label>
				<div class="layui-input-inline">
                                <input type="text" name="type" id="type" autocomplete="off" maxlength="50" class="layui-input" >
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">大学id</label>
				<div class="layui-input-inline">
                                <input type="text" name="univId" id="univId" autocomplete="off" maxlength="50" class="layui-input" >
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">大学名称</label>
				<div class="layui-input-inline">
                                <input type="text" name="univName" id="univName" autocomplete="off" maxlength="50" class="layui-input" >
				</div>
            </div>
        </div>
    </div>

    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
            <label class="layui-form-label">大学招生代码</label>
				<div class="layui-input-inline">
                                <input type="text" name="univCode" id="univCode" autocomplete="off" maxlength="50" class="layui-input" >
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">专业名称</label>
				<div class="layui-input-inline">
                                <input type="text" name="majorName" id="majorName" autocomplete="off" maxlength="50" class="layui-input" >
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">专业代码</label>
				<div class="layui-input-inline">
                                <input type="text" name="majorCode" id="majorCode" autocomplete="off" maxlength="50" class="layui-input" >
				</div>
            </div>
        </div>
    </div>

    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
            <label class="layui-form-label">招生人数</label>
				<div class="layui-input-inline">
                                <input type="text" name="plan" id="plan" autocomplete="off" maxlength="50" class="layui-input" >
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">学费</label>
				<div class="layui-input-inline">
                                <input type="text" name="cost" id="cost" autocomplete="off" maxlength="50" class="layui-input" >
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">学制</label>
				<div class="layui-input-inline">
                                <input type="text" name="schoolYear" id="schoolYear" autocomplete="off" maxlength="50" class="layui-input" >
				</div>
            </div>
        </div>
    </div>

    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
            <label class="layui-form-label">名称附加</label>
				<div class="layui-input-inline">
                                <input type="text" name="plus" id="plus" autocomplete="off" maxlength="50" class="layui-input" >
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">备注</label>
				<div class="layui-input-inline">
                                <input type="text" name="remark" id="remark" autocomplete="off" maxlength="50" class="layui-input" >
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">fileName</label>
				<div class="layui-input-inline">
                                <input type="text" name="fileName" id="fileName" autocomplete="off" maxlength="50" class="layui-input" >
				</div>
            </div>
        </div>
    </div>

    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
            <label class="layui-form-label">lineNum</label>
				<div class="layui-input-inline">
                                <input type="text" name="lineNum" id="lineNum" autocomplete="off" maxlength="50" class="layui-input" >
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">ocrEngine</label>
				<div class="layui-input-inline">
                                <input type="text" name="ocrEngine" id="ocrEngine" autocomplete="off" maxlength="50" class="layui-input" >
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">0，大学招生代码可能有问题，1、无问题</label>
				<div class="layui-input-inline">
                                <input type="text" name="univCheck" id="univCheck" autocomplete="off" maxlength="50" class="layui-input" >
				</div>
            </div>
        </div>
    </div>

    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
            <label class="layui-form-label">名称是否存在 1、存在，0、不存在</label>
				<div class="layui-input-inline">
                                <input type="text" name="nameExists" id="nameExists" autocomplete="off" maxlength="50" class="layui-input" >
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">0，专业招生代码可能有问题，1、无问题</label>
				<div class="layui-input-inline">
                                <input type="text" name="majorCheck" id="majorCheck" autocomplete="off" maxlength="50" class="layui-input" >
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">0，招生人数可能有问题，1、无问题</label>
				<div class="layui-input-inline">
                                <input type="text" name="planCheck" id="planCheck" autocomplete="off" maxlength="50" class="layui-input" >
				</div>
            </div>
        </div>
    </div>

    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
            <label class="layui-form-label">problemDesc</label>
				<div class="layui-input-inline">
                                <input type="text" name="problemDesc" id="problemDesc" autocomplete="off" maxlength="50" class="layui-input" >
				</div>
            </div>
        </div>
    </div>
    <layui:submitButtons id="addButton" />
</form>
<!--#} -->
<script>
layui.extend({
    loading: '../../../plugins/layui_extends/loading/loading',
}).define([ 'form', 'laydate', 'table','loading','planItemApi'], function(exports) {
    var form = layui.form;
    var planItemApi = layui.planItemApi;
    var index = layui.index;
    var isNew = true;
    <!--# if(!(isEmpty(planItemJson))){  -->
    isNew = false;
    <!--# } -->
    var view = {
        init:function(){
            Lib.initGenrealForm($("#addForm"),form);
            this.initSubmit();
        },
        initSubmit:function(){
            $("#addButton").click(function(){
                // $("#addButton").hide();
                // $("#addButton-loading").show();
                // $("#addButton-loading").loading();
                form.on('submit(form)', function(){
                    planItemApi.saveForm(isNew,$('#addForm'),function(){
                        parent.window.dataReload();
                        Common.info("保存成功");
                        Lib.closeFrame();
                    });
                });
            });

            $("#addButton-cancel").click(function(){
                Lib.closeFrame();
            });
        }

    }
    view.init();
    <!--# if(!(isEmpty(planItemJson))){  -->
    var formJson = ${planItemJson};
    form.val("editform",formJson);
    <!--# } -->
});
</script>
